import http from '@/utils/request'

// 获取用户列表
export const getUserList =(params) =>{

    return http.get(`/user/findAll?nick=${params.nick}&size=${params.size}&current=${params.current}`,params)
}
// 新增用户
export const addUser =(params) =>{
    return http.post('/user/add',params)
}
// 删除用户
export const removeUser =(params) =>{
    return http.get(`/user/remove?idList=${params}`,params)
}
// 修改用户
export const updateUser =(params) =>{
    return http.put('/user/update',params)
}

// 政策法规列表
export const getPolicy =(params) =>{
    return http.get(`/policy/findAll?title=${params.title}&size=${params.size}&current=${params.current}`,params)
}
// 新增政策法规
export const addPolicy =(params) =>{
    return http.post('/policy/add',params)
}
// 修改政策法规
export const updatePolicy =(params) =>{
    return http.put('/policy/update',params)
}
// 删除政策法规
export const deletePolicy =(params) =>{
    return http.get(`/policy/remove?idList=${params}`,params)
}
// 新增国防知识
export const addNationalDes =(params)=>{
    return http.post('/nationalDes/add',params)
}
// 查询国防知识
export const getNationalDesList =(params)=>{
    return http.get(`/nationalDes/findAll?title=${params.title}&size=${params.size}&current=${params.current}`,params)
}
// 编辑国防知识
export const editNationalDes =(params)=>{
    return http.put('/nationalDes/update',params)
}
// 删除国防知识
export const removeNationalDes =(params)=>{
    return http.get(`/nationalDes/remove?idList=${params}`)
}

// 新增通知公告
export const addAffiche =(params)=>{
    return http.post('/affiche/add',params)
}
// 查询通知公告
export const getAfficheList =(params)=>{
    return http.get(`/affiche/findAll?title=${params.title}&size=${params.size}&current=${params.current}`,params)
}
// 编辑通知公告
export const editAffiche =(params)=>{
    return http.put('/affiche/update',params)
}
// 删除通知公告
export const deleteAffiche =(params)=>{
    return http.get(`/affiche/remove?idList=${params}`,params)
}

// 退役管理列表查询
export const  getRetirementList = (params)=>{
    return http.get(`/retirement/findAll?nick=${params.nick}&size=${params.size}&current=${params.current}`,params)
}
// 退役管理批准驳回（1,0）
export const ratifyRetirement = (params) =>{
    return http.get(`/retirement/audit?id=${params.id}&result=${params.result}`,params)
}

// 后勤保障列表查询
export const getLeaveList = (params) =>{
    return http.get(`/leave/findAll?nick=${params.nick}&size=${params.size}&current=${params.current}`,params)
}
// 后勤保障批准驳回
export const ratifyLeave = (params) =>{
    return http.get(`/leave/audit?id=${params.id}&result=${params.result}`,params)
}